home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgramD2.iso / Borland / Borland C++ V5.02 / SPINDIAL.PAK / SPINDIAL.CPP < prev    next >
C/C++ Source or Header  |  1997-05-06  |  2KB  |  90 lines

  1. // spindial.cpp : Implementation of CSpindialApp and DLL registration.
  2. //
  3. // This is a part of the Microsoft Foundation Classes C++ library.
  4. // Copyright (C) 1992-1995 Microsoft Corporation
  5. // All rights reserved.
  6. //
  7. // This source code is only intended as a supplement to the
  8. // Microsoft Foundation Classes Reference and related
  9. // electronic documentation provided with the library.
  10. // See these sources for detailed information regarding the
  11. // Microsoft Foundation Classes product.
  12.  
  13.  
  14. #include "stdafx.h"
  15. #include "spindial.h"
  16.  
  17. #ifdef _DEBUG
  18. #undef THIS_FILE
  19. static char BASED_CODE THIS_FILE[] = __FILE__;
  20. #endif
  21.  
  22.  
  23. CSpindialApp NEAR theApp;
  24.  
  25. const GUID CDECL BASED_CODE _tlid =
  26.         { 0x6889608, 0xb8d0, 0x101a, { 0x91, 0xf1, 0x0, 0x60, 0x8c, 0xea, 0xd5, 0xb3 } };
  27. const WORD _wVerMajor = 1;
  28. const WORD _wVerMinor = 0;
  29.  
  30.  
  31. ////////////////////////////////////////////////////////////////////////////
  32. // CSpindialApp::InitInstance - DLL initialization
  33.  
  34. BOOL CSpindialApp::InitInstance()
  35. {
  36.     BOOL bInit = COleControlModule::InitInstance();
  37.  
  38.     if (bInit)
  39.     {
  40.         // TODO: Add your own module initialization code here.
  41.     }
  42.  
  43.     return bInit;
  44. }
  45.  
  46.  
  47. ////////////////////////////////////////////////////////////////////////////
  48. // CSpindialApp::ExitInstance - DLL termination
  49.  
  50. int CSpindialApp::ExitInstance()
  51. {
  52.     // TODO: Add your own module termination code here.
  53.  
  54.     return COleControlModule::ExitInstance();
  55. }
  56.  
  57.  
  58. /////////////////////////////////////////////////////////////////////////////
  59. // DllRegisterServer - Adds entries to the system registry
  60.  
  61. STDAPI DllRegisterServer(void)
  62. {
  63.     AFX_MANAGE_STATE(_afxModuleAddrThis);
  64.  
  65.     if (!AfxOleRegisterTypeLib(AfxGetInstanceHandle(), _tlid))
  66.         return ResultFromScode(SELFREG_E_TYPELIB);
  67.  
  68.     if (!COleObjectFactoryEx::UpdateRegistryAll(TRUE))
  69.         return ResultFromScode(SELFREG_E_CLASS);
  70.  
  71.     return NOERROR;
  72. }
  73.  
  74.  
  75. /////////////////////////////////////////////////////////////////////////////
  76. // DllUnregisterServer - Removes entries from the system registry
  77.  
  78. STDAPI DllUnregisterServer(void)
  79. {
  80.     AFX_MANAGE_STATE(_afxModuleAddrThis);
  81.  
  82.     if (!AfxOleUnregisterTypeLib(_tlid))
  83.         return ResultFromScode(SELFREG_E_TYPELIB);
  84.  
  85.     if (!COleObjectFactoryEx::UpdateRegistryAll(FALSE))
  86.         return ResultFromScode(SELFREG_E_CLASS);
  87.  
  88.     return NOERROR;
  89. }
  90.